Apparatus and methods for analysis of cardiac device stored episodes containing sensed signals and waveforms

ABSTRACT

Apparatus and methods for analyzing implantable medical device (IMD) data and to distinguish specific morphologies for review. EGM waveforms of a cardiac cycle can be grouped according to waveform shape similarities, preferably accomplished using clustering algorithms. The EGM waveform can be divided into segments represented by a one dimensional vector for each segment, and nearest neighbor vector clustering used to group the waveforms according to morphological similarity. The waveforms can be further grouped at a second level into chronologically contiguous similar EGM waveforms. Interval data for a cardiac cycle may also be grouped according to interval similarity and chronology. The chronologically contiguous waveform and interval groupings may be further grouped. Large quantities of EGM data are automatically analyzed and annotated to focus the attention of a cardiologist on likely areas of concern, reducing the need to visually inspect endless streams of EGM waveforms.

FIELD OF THE INVENTION

[0001] The present invention relates generally to cardiac devices. Morespecifically, the invention relates to apparatus and methods foranalyzing and compiling, in a concise format, of cardiac episode such assensor waveform data, EGM data, and implanted medical device (IMD)stored data including morphologies thereof.

BACKGROUND OF THE INVENTION

[0002] Advances in IMD and integrated circuit technology have made itpossible to store large amounts of diagnostic and therapy data. Inparticular, IMDs including but not limited to cardiac pacemakers andimplantable cardiac defibrillators, and cardioverters, increasingly havethe capacity to store large amounts of data. The data may include EGMwaveforms, interval data for various heart chambers, and marker datagenerated by the IMD processor based on analysis of the waveform dataand their morphologies.

[0003] Stored data in IMDs is generally accessed via telemetrycommunications. Specifically, IMD data is downloaded by uplinking to aprogrammer using wireless telemetry. Examples of telemetry systems maybe found in U.S. Pat. Nos. 5,354,319; 5,345,362; 5,383,909; 5,843,139;and 6,091,986, all herein incorporated by reference. The increased datastorage capacity of IMDs requires navigation and review of variousdiagnostic and therapy episodes, thus creating difficulties inextracting data that may be of immediate use to physicians andhealthcare providers. Specifically, physicians are being increasinglyoverwhelmed with the volumes of data they must interpret. The recentadvent of in-home telemetry systems for retrieving and transmittingcardiac data over networks or the Internet will likely further increasethe amount of data to be interpreted.

[0004] What would be desirable are apparatus and methods for alleviatingthe burden of data overload without sacrificing patient care. What wouldfurther be desirable are apparatus and methods for analyzing episodesstored IMDs so that concise clinical summaries of the data can bepresented to the physician for quick analysis and review. Accordingly,apparatus and methods for immediately drawing the attention of thetreating physician to cardiac patient data of likely concern would bemost beneficial.

SUMMARY OF THE INVENTION

[0005] The present invention provides apparatus and methods foranalyzing and processing data originating from devices that sensecardiac signals that vary over at least one cardiac cycle. The IMDsinclude sensors that sense electrical potential, magnetic field,pressure, impedance, fluid flow, fluid velocity, and cardiac muscledynamics. Sensors include internal electrical potential sensors, forexample, electrodes coupled to IMDs. Sensors also include externalelectrical potential sensors, for example, electrodes coupled to EKGmachines and external defibrillators. The internal electrical sensorsmay be used to generate electrogram (EGM) waveforms while externalsensors may be implemented to generate EKG waveforms. Other sensors cangenerate other cardiac waveforms, for example, pressure, magnetic field,motion, velocity, and impedance waveforms that vary periodically overthe cardiac cycle. The invention can be used to analyze signals from aset of several sensors in the atrium and a set of several sensors in theventricle.

[0006] Heterogeneous sensors, for example, electrical potential andpressure sensors both sensing the same heart chamber, can be used tosense heterogeneous waveforms that may be grouped together at variouslevels, for example, grouped into time blocks where there are repeatingsimilar EGM waveforms and repeating similar pressure waveforms thatshare time blocks that substantially overlap in time, and may be deemedco-extensive. As disclosed herein, the present invention primarilyimplements internal electrical potential sensors to generate EGMwaveform signals. The present application also uses interval data as anexample of device generated data. These examples are non-limiting anddepict only some of the uses of the present invention.

[0007] The present invention provides apparatus and methods foranalyzing and processing data originating from IMDs. The apparatus andmethods operate on EGM waveforms, interval data, and otherdistinguishing morphologies, grouping the data into multiple meaningfulsets based both on beat similarities and chronology. The data can beretrieved as a data stream obtained directly from the implanted devicein real-time, from data previously retrieved and stored in volatile ornonvolatile storage, or from a data stream stored in the IMD. In oneembodiment, the data is retrieved over a data communications network, ata location remote to the IMD. The data from the IMD may include EGMwaveform data, cardiac interval data, and IMD generated markers.

[0008] A further embodiment of the invention analyzes stored cardiacdata in an IMD by retrieving the stored data relating to a first heartchamber and dividing the EGM waveform data into numerous EGM heartbeatwaveform segments, where each EGM segment is associated with cardiacactivity. The EGM waveform segments can be grouped into EGMwaveform-similarity or identity-groups as a function of the waveformsimilarities based on their shape, also referred to as morphologicalsimilarities. The grouping is preferably performed by clustering the EGMwaveforms according to the waveform shape or morphologicalcharacteristics. This grouping process can be viewed as a first level ofEGM waveform grouping. In one embodiment, the grouping step includescalculating a waveform shape distance between the numerous EGM cardiacwaveform segments and clustering the waveform segments as a function ofthe distance between the EGM cardiac waveform segments. In one exemplaryembodiment, each EGM cardiac waveform segment is represented as avector, a one-dimensional array, and the distance between two discretewaveforms is designated to be the distance between the two vectors. Thevector distance is a Euclidean distance in some embodiments, or aMahalanobis distance generally.

[0009] In a preferred embodiment, the clustering process utilizesnearest neighbor vector clustering. The first level of EGM waveformidentity groups thus formed can be marked, stored, displayed, printed,output, and any combination thereof, depending on the method. In oneembodiment, the EGM waveform segments are visually displayed togetherwith a visual indicia of the EGM waveform identity group membership, forexample, by enclosing similar EGM waveforms in similarly color coded ortexturally coded boxes.

[0010] The first level of EGM waveform identity groups can be furthergrouped by collecting temporally adjacent EGM waveform segments that arein the same group into chronologically contiguous and similar waveformgroups. The chronologically contiguous grouping of similar EGM waveformsmay be viewed as a second level of grouping. The chronologicallycontiguous waveforms may include only perfectly temporally adjacentsimilar waveforms in some embodiments, while other embodiments allow fora one or two cardiac cycle distance between the similar waveforms. Thesecond level grouping may be marked, stored, displayed, and output. Inone embodiment, the chronologically contiguous and similar waveforms aredisplayed with a visual indicia of second level group membership, forexample, by a color coded or texturally annotated box drawn over severalof the EGM waveforms along the time axis.

[0011] In some embodiments, the stored cardiac cycle interval data isalso analyzed. The interval data may be, for example, A to A or V to Vintervals. In one embodiment, the implanted device interval data isretrieved for a first heart chamber and grouped into heart chamberinterval identity groups, which may be viewed as a first grouping levelfor the interval data. The grouping step may include calculating thedifference or distance between pairs of cardiac cycle intervals andclustering the intervals as a function of the distance between theintervals. In one method, nearest neighbor clustering is used to groupthe intervals.

[0012] Sufficiently similar intervals can be further grouped bycollecting temporally adjacent intervals having the same intervalidentity group membership into chronologically contiguous similarinterval identity groups, which may be viewed as a second level groupingof the intervals. The chronologically contiguous group membership mayrequire perfect adjacency, or allow for a one or two cardiac cycledistance. The intervals may be marked, stored, and/or displayed, aspreviously discussed with respect to the EGM waveforms. In one method,the intervals are color coded or texturally annotated to indicateinterval identity group membership, and be enclosed by boxes to indicatethe second level of chronologically contiguous interval groupmembership.

[0013] With the EGM waveforms and intervals being grouped by identity ata first level and grouped by chronology at a second level, the data canbe further analyzed. The beat data can also be grouped intochronologically coextensive, co-terminus, or co-pending beat regionshaving both substantially the same chronologically contiguous andsimilar EGM waveforms and chronologically contiguous and similarintervals. The results of the third level of grouping may be visuallyindicated by enclosing the appropriate group members in a box drawnabout both the member EGM waveforms and intervals for a heart chamber.

[0014] The data for a second heart chamber may also be retrieved andprocessed as described above with respect to the first heart chamber.The EGM waveforms and beat interval data may be grouped into first levelidentity groups and second level chronological groups. The secondchamber data may be further grouped into the third level ofchronologically co-extensive groups described with respect to the firstheart chamber.

[0015] The third level of chronologically co-extensive groups for thefirst heart chamber and the second heart chamber may be further groupedinto fourth level groups each having chronologically co-extensive firstand second heart chambers segments each having substantially the samethird level group memberships. The fourth level groups each may bevisually indicated by drawing a color coded or textually annotated boxto encompass both the first and second chamber EGM waveforms whereappropriate. In one embodiment, the box would encompass the EGMwaveforms for both the atrium (A) and the ventricle (V). The fourthlevel of chronologically coextensive first and second chamber groupingsmay be further analyzed and classified using classification techniques.The EGM waveforms and beat interval data may be statistically processedand output for each fourth level grouping, for physician review. Methodsin accordance with the present invention may also indicate that nopatterns or groupings worthy of notation and interest were found over acertain time segment. In particular, the lack of chronologicallycontiguous or contemporaneous groups that satisfy higher level groupingrequirements may be noted in the program output.

[0016] The present invention enables analysis and compilation of largequantities of IMD data. Specifically, cardiac data is meaningfullygrouped and displayed based on EGM waveforms and cardiac cycleintervals. In particular, EGM morphologies and intervals may be grouped,respectively, or EGM morphologies and intervals can be grouped together.Further, A and V intervals can be grouped together. The groupings canprovide visual indications of regions likely to be of little interest toa physician together with regions likely to be of concern. The attentionof a cardiologist may thus be focused immediately upon an EGM region ofinterest, reducing the need to visually examine endless streams of EGMwaveform and IMDs.

[0017] In another aspect, the invention provides apparatus and methodsfor compressing long regions of similar patterns and also for selectingan example of a repeating similar waveform, an “exemplar waveform”, forvisual display and/or presentation to a physician. A long repeatingblock or group of repeating similar waveforms, indicating either normalrhythm or arrhythmia, are visually compressed in one embodiment, bydisplaying the waveforms at either end of the block together with anomitted break region in between indicating the time/or number of cyclesof the break and/or the entire compressed time block. In anotherembodiment, a waveform exemplar is displayed together with the timelength and/or number of repetitions. Exemplar waveforms can be selectedfrom the end time regions, middle, selected to have an averagemorphology within the group, or even selected randomly from the group ofwaveforms previously grouped according to similar waveform groupingcriteria.

DESCRIPTION OF THE DRAWINGS

[0018]FIG. 1 is a perspective view of a computer device capable ofreceiving implanted cardiac device data through a telemetry peripheral,and capable of executing programs incorporating methods of the presentinvention;

[0019]FIG. 2A is a flow chart of a method for grouping EGM waveformsinto waveform similarity groups and further grouping the similarwaveforms into chronologically contiguous similar waveform groups;

[0020]FIG. 2B is a flow chart of a method for retrieving implantedcardiac device interval data, grouping the interval data into similaritygroups, and further grouping the interval data into chronologicallycontiguous similar interval groups;

[0021]FIG. 2C is a flow chart of a method for accepting the outputs ofFIGS. 2A and 2B and grouping the chronologically contiguous EGM waveformand interval data into chronologically co-extensive groups for a singleheart chamber;

[0022]FIG. 2D is a flow chart of a method for accepting the output ofFIG. 2C for two heart chambers and grouping the similar andchronologically coextensive portions into a group including theappropriate EGM and interval data for both chambers;

[0023]FIG. 3 is a flow chart of a method for retrieving EGM waveformdata and implanted device data, grouping the data at increasingly higherlevels, and outputting the results;

[0024]FIG. 4 is a strip chart output of atrial and ventricular EGM,interval, and marker data, for a single episode;

[0025]FIG. 5 is a strip chart as in FIG. 4, after the EGM waveforms andintervals have been grouped according to similarity;

[0026]FIG. 6 is a strip chart output as in FIG. 5, after the EGMwaveform and interval similarity groups have been further grouped intochronologically contiguous groups;

[0027]FIG. 7 is a strip chart output as in FIG. 6, after thechronologically contiguous groups of FIG. 6 have been grouped intochronologically co-extensive groups incorporating both EGM and intervaldata for a single chamber;

[0028]FIG. 8 is a strip chart output as in FIG. 7, having theco-extensive groups of FIG. 7 further grouped into co-extensive groupsincorporating both atrial and ventricular groupings, further classified,and analyzed;

[0029]FIG. 9 is a strip chart output as in FIG. 8, having the groupstextually annotated as to the pacing regimes found;

[0030]FIG. 10A is a strip chart output portion utilizing a compressedwaveform display; and

[0031]FIG. 10B is a strip chart output representation of a waveformexemplar.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0032]FIG. 1 illustrates a computer device 30 for directly receivingimplanted device data from an implanted pacemaker or implantedcardioverter defibrillator. Device 30 includes generally an externalcase 32, a display 34, a telemetry peripheral or programming head 36, astylus 38, and numerous ECG leads 40. In one such device, the display isa touch screen, which can be used in conjunction with stylus 38 toselect and input data. A device such as device 30 can serve multiplepurposes, including programming implanted cardiac devices, reading ECGs,and retrieving data including EGMs, interval data, and marker data.Methods according to the present invention may be executed as a computerprogram on any general purpose computer, with the data being receivedthrough conventional data stores or streams, and the results displayedand stored on conventional computer displays and data storage devices,respectively.

[0033]FIG. 2A illustrates a logic step for a computer-implementedprocess or method 200 which can be used to process or analyze EGMwaveform data collected from an IMD. The IMD can be, for example, apacemaker, or a cardioverter defibrillator. The EGM data can includewaveform data including EGM waveform millivolt values at numerous timeintervals. The EGM waveform data may be regularly distributed over timeover numerous heartbeats or may be preferentially distributed near theheartbeat P or R waves. In one method, the EGM waveform data isrepresented as a series of integers represented scaled millivolt values,with time represented either inherently by position in a record orincluding explicit time stamp data together with the amplitude data. Inone embodiment, the EGM waveform data is a very long stream or array ofamplitude data for numerous cardiac cycles, where the cardiac cycles areconsidered centered about the P or R waves, depending on the chamber.

[0034] Method 200, and other methods of the present invention, can becomputer-implemented as a program capable of being executed in a generalpurpose or a special purpose computer. Method 200, and other methods ofthe present invention, may be executed in either the same device usedfor retrieving EGM data from an implanted device or in a general purposecomputer operating on data initially retrieved by another device havingperipherals adapted to directly retrieve the EGM data from the implanteddevice. Method 200, and other methods of the present invention, may alsobe embodied in a computer program stored in computer readable mediaadapted to be read and executed by a general purpose computer. Method200 and the other methods described in the present application may bestored as executable computer programs in non-volatile computer readablemedia including removable flash memory, computer diskettes, computerdisks, CD ROMs, DVDs, and the like. While more than one chamber's datacan be processed using method 200, the method is best understood asoperating on a single chamber data at a time.

[0035] The program is initiated by EGM waveform data at step 204. TheEGM waveform data may be retrieved directly from the IMD, from a datastream originating from the IMD or from a previous set of stored EGMwaveform data. In one embodiment, the retrieved EGM waveform data isstored as a very long array or stream of EGM amplitude data. The EGMdata retrieved is typically for an episode, containing the waveforms ofnumerous heartbeats. An episode can be any set of beat data, but isoften a chronologically contiguous set of beats, and most often a set ofchronologically contiguous beats including an arrhythmia, quite oftenrequiring corrective action by the pacemaker or cardioverterdefibrillator. Some episodes can contain between 10 to 100 beats.

[0036] Step 208 includes extracting EGM waveform beat segments fromareas of interest disposed about each beat. The extracting step can beused to divide up the very long EGM waveform data into beat segments,with each beat segment including EGM waveform data for that beat. Insome methods, the extracting step simply divides up the long EGMwaveform data in to more manageable segments without discarding anydata. In a preferred method, the extracting step selectively extractsEGM waveform data located near the P or R wave. The data located nearthe P or R wave is of more interest than the primarily iso-potentialdata located midway between the peak complexes of adjacent heartbeats.In some methods, the extracting step aligns the beat segments on a peakby extracting data located at a specific time or number of elements toeither side of a prominent waveform feature, such as the P or R wavepeak, to aid in comparing the waveforms at a later time. In othermethods, the markers from the implanted device are used to identify thepeak position and used to align the data in the segments. In a preferredembodiment, the extracted EGM waveform data in the segments is stored asan array or vector, with each EGM waveform data element occupying oneelement of the vector, with successive EGM waveform data pointsoccupying successive elements along one dimension of the vector.

[0037] Step 212 includes clustering the EGM waveform beat segments intomorphological or waveform identity groups, with each group having amorphological or shape identity between the members of that group.Clustering step 212 clusters the EGM waveform beat segments according tomorphological identity, without having previous knowledge of the groupsinto which the waveform segments will be grouped. As used herein, theterm “clustering” refers to a procedure that attempts to identify andextract similar groups from a data set. Unlike classificationprocedures, the number and memberships in the groups are not known apriori. In some methods, the clustering process is agglomerative, whereeach record starts as its own cluster and is merged with other clusters.In a preferred embodiment, the clustering is divisive, where all thedata start in a single large cluster and is gradually broken down intosmaller, more homogeneous clusters. Clustering is discussed in moredetail below.

[0038] In some methods, the morphological identity groups areimmediately displayed with some indicia of group membership, stored,and/or output to a data stream. The morphological identity group membersof step 212 may or may not be chronologically successive or adjacent toeach other. The members of a identity group are typically both foundtogether and dispersed over the episode. Beat segments having the samemorphological identity group membership may be thus grouped togetherchronologically or be separated chronologically from other groupmembers. In a preferred embodiment, the morphological similarity groupsare further processed, but can also be output or displayed directly.Step 212 may be considered to group the EGM waveforms at a first level.

[0039] Step 216 organizes chronologically contiguous similar waveformsegments into a second level of chronologically contiguous beats.Chronologically contiguous waveforms having the same morphologicalidentity group membership as determined in 212 can be further groupedtogether chronologically. In some embodiments, the group need not haveperfect chronological adjacency for the morphologically similarwaveforms. In particular, in some embodiments, morphologically similarbeats may be grouped even if morphologically dissimilar waveforms areinterposed within the collection. In one example, morphologicallysimilar waveforms are considered substantially contiguous if they arelocated no more than one cardiac cycle distance away from anothermorphologically similar waveform. In another example, a distance of twocardiac cycles is allowed while still considering the beats to besubstantially contiguous. Step 216 may be considered to group the EGMwaveforms at a second level.

[0040] In step 220, the waveform groups of step 216 can be marked withsome indicia of group membership prior to storage. In one example, thegroups are stored as data structures or objects having collection andgroup identity stored as an attribute of the data structure or object.Group membership marking in general can be stored as attributes setwithin a data structure or object, as pointers from or to a member ofthe group, and as inheritance, with objects derived from other objects,and the like. In step 224, the waveform groups may be stored tonon-volatile storage and/or output to a data stream. The collections maybe stored as data structures and/or as objects.

[0041] Step 228 displays the marked waveform groups visually for humaninspection. In one embodiment, each beat is marked with an indicia ofmorphological identity group membership, for example, a textual marker.In a preferred embodiment, the waveform groups are visually indicated bya box or a rectangle drawn about all beats considered to be members ofthe same chronologically contiguous and similar waveform groups. In oneembodiment, displaying step 228 includes visually drawing a box on acomputer display around the EGM plot for the heart chamber generatingthe EGM data.

[0042] As indicated by flow control arrow 232, marking step 220 may bebypassed in some embodiments. Further, as indicated by flow controlarrow 236, in some embodiments, storing step 224 may also be bypassed.Furthermore, as indicated by flow control arrow 240, in someembodiments, both marking step 220 and storing step 224 may be omitted,with flow of control proceeding directly to displaying step 228.

[0043]FIG. 2B illustrates an embodiment 250 which may be used topreprocess or analyze interval data for a heart chamber. The intervaldata can be a time interval between significant atrial or ventricularevents. The intervals can be, for example, an A-to-A interval, an A-to-Vinterval, or a V-to-V interval. In yet another embodiment, the intervalinformation is newly deduced from the EGM waveform. In anotherembodiment, however, the interval information is retrieved from the IMD.In a preferred embodiment, the markers from the IMD are also retrieved,which include the marker annotations from the IMD indicating theidentity of the events as interpreted by the IMD. Method 250 may beviewed as operating on interval data from a single heart chamber at atime.

[0044] In step 258, intervals are extracted for each cardiac cycle. Inone example, for an atrium, a succession of A-to-A intervals areextracted. Each interval may thus have a single value, which can haveunits of milliseconds.

[0045] In step 262, the intervals extracted from step 258 are clusteredinto interval identity groups. Intervals that have values numericallyclose to each other may thus be grouped into interval identity groups,while the intervals having significantly different values may beseparated into distinct groups. Two distinct interval identity groupsmay thus be viewed as two distinct clusters of numbers clustered abouttwo points along a number line or axis.

[0046] In step 266, chronologically contiguous interval identity groupsare organized into chronological groups. Step 266 can operate in amanner similar to step 216 discussed with respect to method 200. Afterthe interval identity groups are organized into the collections in step266, a marking step 270 may be executed to mark the collections in ameaningful way. In step 274, the collections may be stored tonon-volatile storage and/or output to a data stream. In step 278, thecollections of interval identity groups may be displayed on a displaydevice. In one method, a box or a rectangle is drawn about the intervaldata on an EGM plot to encompass chronologically contiguous similarintervals. As previously discussed with respect to method 200, in somemethods, beats may be considered chronologically contiguous orsubstantially contiguous if only separated from each other by one or asmall number of beats. As indicated by flow control arrows 290, 282, and286, marking step 270 and/or storing step 274 may be omitted.

[0047]FIG. 2C illustrates an embodiment 300 which may be used to furthergroup the EGM and interval data into a meaningful collection for lateranalysis or display. In embodiment 300, the chronologically contiguousmorphologically similar waveform collections output from step 216 ofmethod 200 may be obtained as indicated at step 301. Similarly, thechronologically contiguous similar intervals from step 266 of method 250may be retrieved as indicated at step 303.

[0048] Step 302 locates or defines chronologically contemporaneous orcoextensive collections of similar EGM waveforms and similar intervals.Step 302 may be understood by visualizing a first rectangle orrectangles drawn around EGM waveform plots and a second set ofrectangles drawn about the EGM interval data. Where the amplitude andinterval collection boxes are chronologically coextensive orsubstantially coextensive, a third larger rectangle may be visualized asencompassing both the EGM waveforms and the intervals. The combined EGMwaveform groups and the interval groups defined by step 302 may beconsidered to be third level groups.

[0049] In step 304, the groups of step 302 can be marked with someindicia of group membership. In step 308, the groups may be stored innon-volatile storage and/or output to a data stream. In step 312, thegroups may be displayed on a computer display device. In one embodiment,the groups are displayed as lines or boxes drawn about both theappropriate EGM waveform groups and the interval groups for one chamber.As indicated by flow control arrows 324, 316 and 320, marking step 304and/or storing step 308 may be omitted in some methods.

[0050]FIG. 2D illustrates embodiment 350 which may be used to furthergroup the EGM data for analysis or immediate visualization. Method 350may be used to group EGM and interval data from two heart chambers tofurther aid in processing or analysis. In step 302A, the groupsincluding both EGM and intervals for a first heart chamber are obtained,as discussed with respect to step 302 in FIG. 2C. Similarly, in step302B, a group of appropriate EGM waveforms and interval are obtained asdescribed with respect to step 302 of method 300 in FIG. 2C. Asindicated by flow control line 351 and 353, the groups are fed to step354.

[0051] In step 354, chronologically contemporaneous or co-extensivegroups from steps 302A and 302B may be found and used to form a fourthlevel grouping of EGM and interval data. The fourth level collection maythus include EGM waveforms and intervals for a first chamber as well assimilar EGM waveform and intervals data for a second chamber. In oneembodiment, the fourth level grouping includes morphologically similarEGM waveforms for the atrium, similar intervals for the atrium,morphologically similar EGM waveforms for the ventricle, and similarintervals for the ventricle. The operation of step 354 may be visualizedby drawing a rectangle or circle about the previous groupings of atrialand ventricular EGM waveform and interval similarities previouslydiscussed.

[0052] The groups output from step 345 may be marked with some indiciaof group membership in step 358. The fourth level groupings may bestored in step 362, and displayed in step 366. As indicated by flowcontrol arrows 378, 370, and 374, the marking and/or storing steps 358and 362 may be omitted in some methods.

[0053]FIG. 3 illustrates a method 400 for preprocessing and analyzingIMD data and outputting visually grouped and annotated versions of thatimplanted cardiac device data. Prior to describing the details of method400, the high level operation of embodiment 400 may be described byreferring to FIGS. 4-9.

[0054]FIG. 4 is a strip chart of IMD data including an atrial EGMwaveform plot, a ventricular EGM waveform plot, atrial interval data,atrial marker data, ventricular interval data, and ventricular markerdata. FIG. 5 includes the IMD data of FIG. 4, with the data extractedinto cardiac cycle segments and grouped into similarity groups,indicated by annotated boxes. FIG. 6 includes the data of FIG. 5,further having similar and chronologically contiguous cardiac cyclefurther grouped into second level chronologically contiguous beatgroups. FIG. 7 includes the data of FIG. 6, having the chronologicallycontiguous groupings of FIG. 6 further grouped into third level groupswhich group together chronologically contemporaneous or coextensivearterial EGM data and interval data as well as chronologicallycontiguous or coextensive ventricular EGM data and interval data. FIG. 8includes the data of FIG. 7, having the third level groupings furthergrouped into fourth level groupings encompassing chronologicallycontemporaneous or coextensive arterial EGM, arterial interval,ventricular EGM, and ventricular interval data. The fourth levelgroupings of FIG. 8 have further been classified, including classes ofwaveforms and timings previously established. FIG. 9 includes the IMDdata of FIG. 8, having the fourth level classified groups of FIG. 8further annotated based on the classification and analysis. Embodiment400 thus proceeds from rather raw implanted cardiac device data asillustrated in FIG. 4 to the analyzed data of FIG. 9 being grouped intofive chronological regions.

[0055]FIG. 3 illustrates embodiment 400 as beginning with a save-to-diskfile retrieval step 402. Steps 402, and 404, are well known to thoseskilled in the art. Step 402 represents any data retrieval step forretrieving IMD data. The data can originate from IMDs such aspacemakers, and implantable cardioverter defibrillators. In somemethods, the IMD data will be retrieved directly from the implantedcardiac device, while in other methods, the data will be retrieved fromnon-volatile storage long after the data has initially been retrievedthrough a telemetry link between the implanted cardiac device and asuitable telemetry unit coupled to write to the non-volatile storage.The data retrieval step 402 thus represents any step for retrieving datafrom nonvolatile storage or a data stream of an IMD.

[0056] In step 404, a translation utility is used to translate the dataretrieved in step 402. The data retrieved in step 402 may often be apurely binary file, requiring translation for further understanding.Translation step 404 can convert the binary file into a text file formatfrom which specific data can more easily be extracted.

[0057] In step 406, a translation utility output parser operates on theoutput of step 404 to extract data for a specific episode or episodes.An episode is the occurrence of a therapy or diagnostic event that maybe of particular interest. Some episodes consist of a series of beats inwhich a device detects and/or treats arrhythmia. The time period may beof interest because of required tachycardia pacing, cardioversion, orrequired defibrillation. Given a particular episode, the atrial andventricular EGM can be extracted along with the interval and markerdata. The output of step 406 can thus be a time period includingnumerous cardiac cycles together with associated sensed waveform,interval, and marker data. As is well known to those skilled in the art,the interval data includes the intervals deduced or inferred by theimplanted cardiac device. The atrial intervals may be A-A intervalswhile the ventricular intervals may be V-V intervals. Cross-chamberintervals may also be included, the A-V interval indicating durationfrom the atrial depolarization to the ventricular depolarization and V-Ainterval indicating the duration from the ventricular depolarization tothe atrial depolarization. The markers are also well known to thoseskilled in the art and include records stored in IMDs indicating thetypes of signals collected or therapy delivered to treat a cardiaccondition. Examples of atrial markers include AS (atrial sense), AR(atrial refractory sense), and AP (atrial pace). Examples of ventricularmarkers include VP (ventricular pace), VS (ventricular sense), TD(tachycardia detect), TS (tachycardia sense), and TP (tachycardia pace).Markers are further discussed in U.S. Pat. No. 5,383,909, hereinincorporated by reference.

[0058] In step 408A, atrial EGM waveforms are clustered, in step 408B,the atrial intervals are clustered, in step 408C, the ventricular EGMwaveforms are clustered, and in step 408D, the ventricular intervals areclustered. Similar to FIG. 3 and method 400, the reference number suffixA will be used to refer to atrial EGM data, the suffix B will refer toatrial interval data, the suffix C will be used to refer to ventricularEGM data, and the suffix D will be used to refer to ventricular intervaldata.

[0059] In step 408A, the atrial EGM waveform data may be extracted fromthe region of each cardiac cycle to form a heartbeat EGM segmentassociated with each heartbeat. In some embodiments, less than half thetotal EGM data may be extracted into the cardiac cycle segments at slowheartbeats. In other embodiments, the entire set of EGM data may beextracted, with the cardiac cycle segment data being extracted mainly todivide each heartbeat from the next. While the term “extracted” may beused, the EGM data may of course be left in place and referencedindirectly by the subsequent algorithm steps. The total EGM data maythus be divided into heartbeat segments about each heartbeat, which maystill be referred to as the extraction step.

[0060] In one extraction or dividing step, the EGM cardiac cyclesegments are synchronized with respect to time, such that thepredominant peak of each segment is in the same location within eachsegment. The atrial EGM data may thus be consistently extracted relativeto the P-wave while the ventricular EGM data may be consistentlyextracted with respect to the R-wave. In one method, 15 EGM samples areextracted from about the P-wave to populate the cardiac cycle segmentdata for the atrial data, while 20 EGM samples are extracted from aboutthe R-wave to populate the cardiac cycle segment data for theventricular data. In a preferred embodiment of the present invention,the extracted EGM data is used to populate a vector. A vector may bethought of as a one dimensional array but of course may be amulti-dimension array, with one dimension for each cardiac cyclesegment. A 15 sample atrial window may thus populate a vector orone-dimensional array having 15 elements while the 20 sample ventricularwindow may be used to populate a vector or one-dimensional array having20 elements. In another embodiment, between about 40 and 50 elementsfrom about the QRS complex are used to populate each vector. The timedisplacement between elements may be inferred from a position within thevector. The relative sizes of the heartbeat segments extracted into thevectors may be visualized with respect to the boxes superimposed overthe EGM plots of FIG. 5. While the entire EGM data set may be used, onlythe data centered about the heartbeat is of primary interest and theextraction step can reduce computation.

[0061] With continued reference to FIG. 3 and step 408A, the EGM cardiaccycle segments may be grouped together based on waveform identity. Thisgrouping based on waveform identity or waveform morphology is preferablyaccomplished by clustering, without an a priori knowledge of the groupsinto which the heartbeat segments will be grouped. Unlike classificationprocedures, the number and memberships in the groups are preferably notknown a priori. As used herein, the term “clustering” refers to methodsused to identify and extract similar groups from a data set based onfeatures of the data set using the proximity of the data set memberfeatures.

[0062] The distance can be calculated between every vector and everyother vector. The vectors can be sorted by closeness to other vectors.In one nearest neighbor method, a first vector is retrieved, and thenearest vector to that first vector saved as the second vector. Then thesecond vector can be queried to find the vector closest to the secondvector, to be saved as the third vector, ignoring vectors that werereviewed earlier. The method can thus proceed through all vectors toproduce a sorted array or tree. The output of clustering step 408A canbe a single binary tree.

[0063] While various clustering algorithms may be used, in a preferredembodiment, nearest neighbor vector clustering is used. The distancebetween the EGM heartbeat segments may be represented by the distancebetween the vectors comprising the EGM cardiac cycle segments. In onemethod, a Euclidean distance is used as the vector distance between thetwo representative vectors. Other suitable distances may be used,including Mahalanobis distances generally.

[0064] The clustering algorithm preferably generates a binary tree wheresibling subtrees contain data items that are closer to one another thanto any other items in the data set. In the case of two leaf nodes, thetwo vectors are closer to one another than to any other vectors in thedata set. Each node in the tree also contains the actual distancebetween the closest vectors in right and left subtrees. The tree isordered such that a parent node always has a closest distance greaterthan or equal to the closest distance of the right and left subtrees.Clustering in general and nearest neighbor vector clustering are bothwell documented. In particular, see Pattern Recognition, Chapters 1116,by Theodoridis, et al. (Elsevier Science, 1999), herein incorporated byreference.

[0065] In step 410A, a identity threshold can be calculated for the datapresent in the atrial EGM heartbeat segments. A identity threshold isused to determine whether two waveform vectors are close enough to beconsidered the same. In some embodiments, the identity threshold is aconstant fraction of the average peak-to-peak amplitude for all thewaveform segments being compared. The distance between vectors isdependent upon waveform amplitude, so a dynamic threshold based onaverage maximum amplitude for each beat is more effective than a fixedthreshold. This value can be calculated by averaging the peak amplitudefor all beats in a given waveform for the episode. The identitythreshold is preferably proportional to the average amplitude. Forclustering the intervals, a fixed similarity threshold can be used andneed not necessarily be calculated. Inspection of FIG. 3 illustratesthat the calculate similarity threshold step 410A is receiving inputfrom the translation utility output parser step 406. In someembodiments, step 410 may be considered to obtain output from thetranslation utility output parser step 406, while in other embodiments,the input may be considered to come from a portion of nearest neighborvector clustering step 408A. In particular, some extraction or divisionof the EGM data into the cardiac cycle segments may be performed in step406 with the output being used by calculate similarity threshold step410A.

[0066] In step 412A, the largest substantially similar subtrees areidentified, using the identity threshold output of step 410A and thebinary tree output of step 408A. In one method, the sub-treeidentification step makes sure that the minimum distances between eachleaf node in a subtree and the other leaf nodes in the sub-tree are allless than the identity threshold. The sub-tree identification can alsomake sure that the maximum distance between all members of a subtree isbelow a second threshold. If the maximum distance exceeds the secondthreshold, the members of that sub-tree are not considered to besubstantially similar. In other words, in this sub-tree identificationstep, subtrees are identified that are substantially different from eachother so as to constitute both similar waveforms within the subtrees andsufficiently dissimilar waveforms from those of the other subtrees. Inone method, the binary tree created in the nearest neighbor vectorclustering step is recursively traveled and subtrees are found that meettwo criteria. The first criteria is that the closest distance associatedwith the parent node of the subtree is less than the similaritythreshold calculated. The second criteria is that the longest possibledistance between any two items in the tree is less than twice thecalculated similarity threshold. The output of pruning step 412A is thusa set of one or more subtrees having substantially similar waveformmorphologies within each subtree. The particular subtree membership maybe stored in or associated with each EGM heartbeat segment for immediatestorage, transmission, or visual display. It should be noted thatmembership within a particular waveform or morphological identity groupmay be common to waveforms disbursed throughout the episode and/orwaveforms chronologically contiguous to one another.

[0067] In step 415A, far field R-waves (FFRWs) are found. The subtrees,which have the waveforms and intervals ordered by similarity, can beused in this step also. Step 415A accepts as input the atrial EGMsubtrees from step 412A and the atrial interval subtrees from step 412B,to be discussed later.

[0068] The FFRW algorithm for one embodiment is further describedhereinbelow. The starting point for this algorithm is the sets of atrialbeats that have been grouped by morphological similarity. This algorithmonly applies to atrial beats. All sets that have greater than 90% ofbeats meeting FFRW timing criteria are candidates. The FFRW timingcriteria for this embodiment require that an atrial beat must precedeventricular beat by less than 50 ms, or must follow the ventricular beatby less than 140 ms.

[0069] The following five statistics are preferably gathered on eachset. (Statistic 1) The number of beats in the set that are contiguous,as the FFRWs should generally not be contiguous since they occur inaddition to real atrial beats. (Statistic 2) The number of beats thathave an AA interval within 10% of the next M interval, as the intervalsare likely to be different since a FFRW is a false beat interrupting thepattern of the rhythm. (Statistic 3) The number of beats with amorphological difference from the previous beat below a threshold of0.05*Amplitude, as we would expect a FFRW to have a different morphologyfrom a normal beat. (Statistic 4) The number of beats with apeak-to-peak amplitude greater than 70% of next beat, as it is likelyfor a FFRW to have a lower amplitude than real beats since it is“far-field”. (Statistic 5) The number of beats in the set.

[0070] A set of constraints can then be applied to the statisticsgathered for each candidate set of beats to declare the set of atrialbeats as FFRWs. If any one of these constraints, or rules, is true for acandidate set of beats then all beats in that set are considered to befar-field R-waves.

[0071] Rule 1: If Statistic 1=0 and Statistic 4=0 No beats arecontiguous and all beats have amplitude of less than 70% of next beat.

[0072] Rule 2: If Statistic 1=0 and Statistic 2=0 and Statistic 3<2 Nobeats are contiguous and no beats have an AA interval within 10% of thenext beat and only 1 of the beats is morphologically similar to itsprevious beat.

[0073] Rule 3: Statistic 1=0 and Statistic 3/Statistic 5<0.1 andStatistic>10. No beats are contiguous and less than 10% of the beats aremorphologically similar to the previous beat and there are at least 10beats in the set.

[0074] Embodiment 400 of FIG. 3 and sub-tree identification step 412Amay be better understood by referring to FIG. 4. FIG. 4 includesgenerally implantable cardiac device data 500 displayed in a strip chartformat as may be output from a programmer, computer, a remote monitor oran equivalent device. IMD data 500 has been divided into three segmentsfor display purposes only. Data 500 thus includes a first portion 502, asecond portion 504, and a third portion 506. This same format isrepeated in FIGS. 4-9. The top portion of each strip includes generallyan atrial EGM plot 508 which includes an electrical potential ormillivolt trace over time for the atrium. In this example, atrial trace508 has been taken from an atrial tip to atrial ring. The amplitude ofthe atrial pace may be seen by referencing the amplitude marker 512.Atrial trace 508 depicts a predominant P wave peak 514 and substantiallyflat inter-peak or iso-potential portions 516. Ventricular trace 510depicts a predominant R wave, separated by inter-peak substantially flatregions 520. Numerous atrial interval values 522 are depicted includingatrial markers 524. Similarly, numerous ventricular intervals 526 areshown together with ventricular markers 528.

[0075] Referring to FIG. 5, the output of identify subtree step 412Afrom FIG. 3 may be observed. Atrial trace 508 includes subtree groupmembership marked for each heartbeat segment or series of segments. Thegroup membership indicates a similar morphology for the EGM waveform.Atrial beat segments 530 (and also the later discussed ventricular traceand atrial and ventricular intervals) have been denoted as belonging togroups “B”, “R”, “BR”, “G”, “M”, “Y”, and “BK”, denoting the colorsblue, red, brown, green, magenta, yellow and black present on theoriginal colored output, respectively. FIG. 5 illustrates that there areseveral atrial cardiac cycle segments belonging to group B, followed bya single R group member followed by several more B group members, etc.It should be noted that in this representation the morphologicallysimilar cardiac cycle segments were grouped according to waveform ormorphology similarities, not in chronological relation to each other.

[0076] With continued reference to FIG. 3, method 400 may be furtherdiscussed, beginning with step 414A. In step 414A, chronologicallycontiguous and similar beats are found. In one method, each subtreefound with beats of similar morphology is recursively traversed to findranges of contiguous beats or substantially contiguous beats containedwithin that tree. Single beat exceptions may be allowed and theexception beats for each range along with the possible diagnosis of thebeat (e.g., FFRW, PVC, PAC, and PACED or unknown) are associated withthe contiguous range. The term “chronologically contiguous” may be usedeven though the beats need not be chronologically adjacent, but may bedistant from one another by one or more beats, depending on theembodiment. In a preferred embodiment, as previously discussed, thebeats may be considered as contiguous even when the contiguous sequenceis interrupted by a beat from a different group. The output of theidentify subtree step 412A may be considered as a first level groupingof heartbeat segments, and the output of step 414A considered as asecond level grouping of beat segments using chronology. The output ofstep 414A may be visualized with respect to FIG. 6. Chronologicallycontiguous similar beat segments have been grouped into groups 540denoted by group membership notations R, B, M, as previously discussedas describing the colors of the original plot.

[0077] Further referring to FIG. 3, the processing of the atrialintervals may be discussed, beginning with step 408B. In step 408B, theintervals are clustered into identity groups, in a method somewhatsimilar to that used in step 408A. In step 408B, the similaritythreshold is preferably fixed. Nearest neighbor clustering is thepreferred clustering algorithm used in step 408B. The output of step408B is preferably a single binary tree which is operated on by step412B which identifies similar subtrees. Step 412B uses a similar methodas described with respect to 412A, previously discussed. The output ofidentify sub-tree step 412 is preferably a series of subtrees, with eachsubtree containing similar intervals. The output of identify sub-treestep 412B may be visualized by referring again to FIG. 5. The atrialmarkers 534 of FIG. 5 have been grouped into similarity groups onceagain denoted arbitrarily by a letter code denoting the color output inone embodiment of the invention, previously described. In one method,the interval similarities are denoted by color coding the markers and/orsurrounding the markers with a color coded box, as seen in FIG. 5.

[0078] With continued reference to FIG. 3, step 414B accepts the outputfrom step 412B and finds chronologically contiguous similar beats in amanner similar to step 414A previously discussed. The output of step414B may be visualized by referring again to FIG. 6. In FIG. 6, thechronologically contiguous similar intervals have been grouped into asecond level grouping seen at 544 and assigned a group notation onceagain corresponding to the color of the original output. In the topstrip of FIG. 6, the chronologically contiguous and similar atrialintervals have been grouped into group 544.

[0079] Before proceeding to step 416A, the steps for processing theventricular data may be briefly discussed. The ventricular data can beprocessed similar to the atrial data. Thus, step 408C is similar to step408A, 408D is similar to step 408B, step 412C is similar to step 412A,step 412D is similar to step 412B, step 414C is similar to step 414A,step 414D is similar to step 414B, and step 410C is similar to step410A. Referring again to FIG. 5, ventricular EGM heartbeat segments 532have been grouped into waveform or morphological similarity groupsdenoted by the letter or color codes previously described. Similarly,the ventricular intervals 536 have been grouped into similarity groupsdenoted by the letter or the color codes previously described. FIG. 6shows the ventricular EGM waveforms further grouped into thechronologically contiguous groups 542 and assigned the letter or colorcodes previously discussed. Similarly, the ventricular intervals havebeen further grouped into the chronologically contiguous groups 546, ina manner previously discussed with respect to the atrial intervalchronologically contiguous groups.

[0080] With continued reference to FIG. 3, step 416A may be discussed.In step 416A, consistent (chronologically coextensive orcontemporaneous) atrial segments are found. In this step, each channelis partitioned into segments of similar pattern. The segments mayconsist of similar morphology and interval pattern, just similarmorphology pattern, just similar interval pattern, or no pattern.Segments that consist of both similar morphology and interval patternare found by taking the intersection of overlapping contiguous ranges ofmorphology pattern and interval pattern. If the EGM segment is greaterthan 10% longer than the interval segment, then the interval patternsimilarity is ignored in one embodiment. When a segment is createdconsisting of both similar EGM morphology pattern and interval pattern,then the exception list of those two ranges are merged. The exceptionlist is simply a list of beats in the contiguous segment with dissimilarmorphology or interval pattern. Segments of the episode that are notcovered by either an interval segment or an EGM segment can also beidentified as a pattern-less segment. Step 416C operates in a mannersimilar to step 416A, with step 416C operating on ventricular data. Step416A thus accepts the second level or chronological groupings from steps414A and 414B, and, where appropriate, further groups them into a thirdlevel group. This third level group thus can encompass both the EGMwaveform chronological grouping and the interval chronological groupingfor a single chamber.

[0081] The output of steps 416A and 416C may be visualized byreferencing FIG. 7. In FIG. 7, the third level grouping output fromsteps 416A and 416C is again denoted by boxes drawn about the EGMwaveforms at 550 and 552 and marked with the letter or color code.

[0082] With continued reference to FIG. 3, step 424 may be discussed. Instep 424, consistent (chronologically coextensive or contemporaneous)episode segments are found. In this step, the episode is divided intosegments of common pattern using both chambers and using both EGM andinterval patterns. In a preferred embodiment, the intersection ofsegments being combined across chambers must be at least 60% of the sizeof the original segments. The segments with the greatest number ofcommon patterns are preferably found first. In a preferred embodiment,EGM pattern segments are favored over interval pattern segments.Segments with no pattern can also be identified.

[0083] In step 418, interval statistics can be computed. For a givenrange of beats in a chamber, the interval average and standard deviationcan be computed. Also, over the same range, the average differencebetween the EGM vectors and the standard deviation of that differencecan also be computed.

[0084] In step 420, the conduction pattern can be classified. In thisclassification, all atrial interval trees with beats in the range of thespecified segments can be found. Then it may be determined whether allbeats from each tree are equally distributed throughout the range. Ifso, this indicates a repetitive interval pattern characteristic ofnon-one-to-one conduction. The ratio of atrial beats to ventricularbeats indicates the actual conduction pattern. For retrogradeconduction, the same procedure can be used, but driven from theventricular channel rather than the atrial channel.

[0085] In step 422, the conduction direction can be classified. The AVand the VA interval standard deviation through the specified range canbe used to determine whether the conduction is antegrade or retrograde.If the AV interval is more stable within a specified range, antegradeconduction is indicated. If the VA interval is more stable within aspecified range, retrograde conduction is indicated.

[0086] In step 426, the results of steps 418, 420, 422 and 424 may beused as input. In step 426, the conduction pattern, conductiondirection, rate, and EGM and interval patterns found in this segment areused to provide a classification for the atrium and ventricle in thegiven segment of the episode. Classification methods in general are wellknown. See U.S. Pat. No. 6,217,525 and Pattern Classification and SceneAnalysis, by R. Duda and P. Hart, (pub. John Wiley & Sons), both hereinincorporated by reference.

[0087] The output of step 416 may be visualized by referring to FIG. 8.In FIG. 8, the fourth level groupings from step 416 are illustrated. Aresult for one such analysis may be discussed for group 462 of FIG. 8.In an actual embodiment of the invention, grouping 462 was classified ashaving an episode segment from ventricular beat 1 to atrial beat 11.This extended from 710 milliseconds to 6520 milliseconds, having aduration of 5810 milliseconds. A segment pattern was found in theventricular EGM, the atrial EGM, the ventricular interval, and theatrial interval. For the atrium, there were 10 beats, zero paced, 10sensed, zero therapy, and zero FFRW. For the ventricle, there were 10beats, 10 paced, zero sensed, and zero therapy. For the atrium, theaverage interval was 593 milliseconds with a standard deviation of fivemilliseconds. The ventricle had an average of 592, with a standarddeviation of four milliseconds. The VA interval averaged 473 with astandard deviation of five milliseconds. The AV interval averaged 120with a standard deviation of zero. This grouping was analyzed andclassified as having a sinus atrial rhythm, conduction of one-to-oneantegrade, and a VPACE ventricular rhythm. The discussion of group 462is for purposes of illustration. Similar types of analysis andclassification can be provided for the other groups.

[0088] Referring again to FIG. 3, annotation step 428 may be discussed.In step 428, a final classification of the segment or group isdetermined based on the atrial and ventricular classifications. A textstring can be generated to annotate that segment of the episode. Theoutput of step 428 may be visualized with respect to FIG. 9.

[0089] In FIG. 9, the groupings of FIG. 8 have been further analyzed aspreviously discussed. Group 470 can be annotated to indicate a VPACEDsinus rhythm. Group 472 can be annotated to indicate ventriculartachycardia. Group 474 can be annotated to indicate antitachycardiapacing. Group 476 can be annotated to indicate ventricular paced sinusrhythm. Finally, group 478 can be annotated to indicated ventricularpaced sinus rhythm.

[0090]FIG. 10A illustrates another aspect of the invention includingwaveform compression. A strip chart display 600, which was taken from aprogrammer display, includes a first sensor channel 604 and a secondsensor channel 606. In this example, first channel 604 includes anatrial EGM waveform and second channel 606 includes a ventricular EGMwaveform. A compressed cardiac waveform region 602 includes a first endwaveform region 610 and a second end waveform region 612, separated by abreak or omitted region 614. Compressed region 602 contains a regionhaving chronologically co-extensive, chronologically contemporaneous andmorphologically similar atrial waveforms and chronologicallycontemporaneous and morphologically similar ventricular waveforms. Thelength of region 602 has been compressed by displaying the firstwaveforms at 610, the last waveforms at 612, with a break for themiddle, similar, omitted waveforms, at 614. The length of the repeatingwaveform region at 614 has been indicated at 618, to be 13590 ms inlength. In some embodiments, the length of the repeating, omittedregion, is indicated in units of time and/or beats. The classificationof the repeating waveform is indicated at 616 to be Atrial Tachycardia.

[0091]FIG. 10B illustrates another compression method according to thepresent invention. An example of a waveform grouping 630, termed an“exemplar”, has been displayed, rather than displaying a long run ofmorphologically, repeating waveforms. Exemplar 630 includes a firstsensor waveform exemplar 632, of an atrial EGM, and a second sensorwaveform exemplar 634, of a ventricular EGM. Exemplar 630 is a groupedor composite exemplar including both exemplars 632 and 634. A repeatlength indicator 640 indicates the length of the repeating group in bothseconds and number of beats. A classification indication 642 indicatesthat the exemplar has been classified as a region of V. Paced SinusRhythm. Exemplars can be put to a first use in compression, as in FIG.10B, to represent a long series of grouped and similar waveforms, bydisplaying one of the similar waveforms together with an indication ofthe number of repeats, rather than displaying every one of the similarwaveforms.

[0092] In a second use of exemplars, a single waveform exemplar can bestored and/or transmitted, along with a repeat indicator, to represent amuch longer series of waveforms. The received exemplar can berepresented as an exemplar and/or uncompressed into a representation ofthe original long series of waveforms.

[0093] In a third use of exemplars, an exemplar can be selected andpresented to a clinician as a representative waveform from anarrhythmia. In a fourth use, an exemplar can be selected from two ormore different episodes, and the exemplars compared to determine if thearrhythmia is the same. In this way, two arrhythmias from differenttimes for the same patient can be automatically compared for waveformsimilarity.

[0094] Exemplars can be selected from according to different levels ofgrouping in different methods. Exemplars can be selected to represent afirst level of morphologically similar waveforms, a second level ofsimilar and chronologically contiguous waveforms, a third levelrequiring multiple sensor or multiple channel chronologically contiguouswaveforms, and so forth.

[0095] In one embodiment of the invention, the cardiac sensor data isinput to a software program previously described where the programimplements some or all of the parts of method 400 of FIG. 3. The outputof some programs may simply assign and store the various groupmemberships previously described for the heartbeat segments. Thisgrouping can be later transmitted or displayed. In a preferredembodiment of the invention, the output includes a visual output,preferably in color, and annotated as discussed with respect to FIGS.4-10.

[0096] The detailed descriptions of the preferred embodiments providedherein yield an accurate, efficient and reliable apparatus and methodsto analyze, compile, classify and identify cardiac cycle eventsincluding therapy, diagnostic events and signal morphologies acquiredfrom an implantable medical device. Numerous variations of the describedembodiments are possible for practicing the invention. Therefore, theembodiments described herein should be considered exemplary, rather thanlimiting, with regard to the following claims.

What is claimed is:
 1. A method for analyzing cardiac waveform data fora plurality of cardiac cycles, wherein the cardiac cycles have anassociated waveform cycle segment, the method comprising grouping thecycles into one or more cycle waveform identity group based on waveformsimilarities with other members of the group, with members of the samewaveform identity group having similar waveform shapes to the otherwaveform identity group members.
 2. A method as in claim 1, furthercomprising processing the identity groups by executing one of a step ofstoring the identity group to non-volatile storage, marking the groups,displaying the waveforms with visual indicia of group membership,printing the waveforms with visual indicia of group membership, andtransmitting the groups over a data communications network.
 3. A methodfor analyzing stored cardiac waveform data for a plurality of firstheart chamber cycles, the method comprising grouping the cycles into afirst level of cycle waveform groups, with members of the same firstlevel waveform group having similar waveform shapes to the other firstlevel waveform group members.
 4. A method as in claim 3, furthercomprising: grouping the cycles into a second level of beat waveformgroups, with members of the same second level waveform group havingsimilar waveform shapes to the group members and being substantiallychronologically contiguous to the other second level waveform groupmembers.
 5. A method as in claim 4, wherein the cycles have anassociated cycle interval, further comprising: grouping the cycles intoa second level of beat interval groups, with members of the same secondlevel interval group having similar intervals to the other second levelinterval group members and being substantially chronologicallycontiguous to the other second level interval group members; andgrouping the cycles into a third level of cycle first chamber groups,wherein the members of the third level first chamber group aresubstantially all members of both the same second level cycle waveformgroup and the same second level cycle interval group.
 6. A method as inclaim 4, wherein the cycles have an associated cycle interval, furthercomprising: grouping the cycles into a second level of cycle intervalgroups, with members of the same second level interval group havingsimilar intervals to the other second level interval group members andbeing substantially chronologically contiguous to the other second levelinterval group members; and grouping the cycles into a third level offirst chamber groups, wherein members of the third level first chambergroup are substantially all members of both the same second level beatwaveform group and the same second level beat interval group, andwherein the members of the third level first chamber group aresubstantially chronologically coextensive with each other.
 7. A methodas in claim 5, wherein the data further includes data for a second heartchamber, wherein the second chamber cycle data includes waveform dataand associated cycle intervals, the method further comprising: groupingthe second chamber beats into a first level of second chamber cyclewaveform groups, with members of the same second chamber first levelwaveform group having similar waveform shapes to the other secondchamber first level waveform group members; grouping the second chambercycles into a second chamber second level of cycle interval groups, withmembers of the same second chamber second level interval group havingsimilar intervals to the other second chamber second level intervalgroup members and being substantially chronologically contiguous to theother second chamber second level interval group members; and groupingthe second chamber cycles into a second chamber third level of cyclegroups, wherein the members of the same second chamber third level groupare substantially all members of both the same second chamber secondlevel cycle waveform group and the same second chamber second levelcycle interval group; and grouping the first and second chamber thirdlevel groups into a fourth level of beat groups, wherein the members ofthe same fourth level group are substantially chronologicallycoextensive.
 8. A method for analyzing stored cardiac EGM waveform datafor a plurality of a first heart chamber cycles, the data including aplurality of waveform cycle segments, the data initially originatingfrom an implanted device, the method comprising: grouping the waveformcycle segments into a first set of cycle groups as a function ofwaveform shape similarity, wherein each of the first set group membershave similar waveform shapes to the other members of the same first setgroup
 9. A method as in claim 8, further comprising processing the firstset groups by executing one of a step of marking, storing, displaying,and outputting the group memberships, and combinations thereof.
 10. Amethod as in claim 8, wherein the grouping includes clustering thewaveform cycle segments based on waveform shape similarity.
 11. A methodas in claim 10, wherein the clustering includes nearest neighborclustering.
 12. A method as in claim 11, wherein the waveform cyclesegments are treated as vectors, and the clustering includes nearestneighbor vector clustering.
 13. A method as in claim 12, wherein theclustering clusters using the Euclidean distance between the vectors.14. A method as in claim 10, wherein the waveform beat segments aretreated as vectors, and the clustering clusters using the Euclideandistance between the vectors.
 15. A method as in claim 8, furthercomprising: grouping the waveform cycle segments into a second set ofcycle groups, wherein the second set group members are substantiallychronologically contiguous to the other second set group members and aremembers of the same first set group.
 16. A method as in claim 15,further comprising processing the first set groups by executing one of astep of marking, storing, displaying, and outputting the groupmemberships, and combinations thereof.
 17. A method for analyzing storedcardiac EGM data from an implantable device, the method comprising:retrieving the stored data, wherein the data includes EGM waveform data;dividing the EGM waveform data into a plurality of cardiac cyclewaveform segments, wherein each heartbeat waveform segment is associatedwith a heartbeat; and grouping the EGM cardiac cycle waveform segmentsinto waveform identity groups as a function of waveform shapesimilarities.
 18. A method as in claim 17, wherein the grouping includescalculating a waveform shape distance between the cardiac cycle waveformsegments and clustering the cardiac cycle waveform segments as afunction of the shape distance between the heartbeat waveform segments.19. A method as in claim 18, wherein each cardiac cycle waveform segmentis represented as a vector and the shape distance is a distance betweenthe vectors.
 20. A method as in claim 19, wherein the vector distance isa Euclidean distance.
 21. A method as in claim 3, wherein the clusteringstep includes the nearest neighbor vector clustering.
 22. A method as inclaim 19, further comprising marking the EGM heartbeat waveform segmentswith an indicia of identity group membership and storing the marked EGMidentity waveform segments in nonvolatile storage.
 23. A method as inclaim 17, further comprising the step of visually displaying the EGMheartbeat waveform segments together with a visual indicia of thewaveform identity group membership for each EGM heartbeat waveformsegment.
 24. A method as in claim 17, further comprising collectingtemporally adjacent heartbeat waveform segments having the sameheartbeat waveform identity group membership into chronologicallycontiguous similar cardiac cycle waveform segments.
 25. A method as inclaim 24, wherein the temporally adjacent cardiac cycle waveformsegments are located at a distance at no more than n cardiac cycles fromeach other, wherein n is selected from a group consisting of 1, 2, and 3cardiac cycles, wherein n=0 indicates perfect adjacency.
 26. A method asin claim 24 further comprising marking the collections with indicia ofcollection membership and storing the marked collections to nonvolatilestorage.
 27. A method as in claim 24, further comprising visuallydisplaying the collections with a visual indication of cardiac cyclewaveform segment collection membership.
 28. A method of processingstored cardiac interval data from an implantable device, a methodcomprising: retrieving the stored interval data, wherein the intervaldata includes interval data for a plurality of cardiac cycle for a firstheart chamber, wherein the interval data includes interval data for eachcardiac cycle; clustering the interval data into similarity groupshaving similar intervals to other members of the same group; andorganizing substantially similar and chronologically contiguous cardiaccycle intervals into collections of substantially chronologicallycontiguous beats.
 29. A method as in claim 28, further comprisingmarking the collections of substantially chronologically contiguouscardiac cycle intervals with indicia of collection membership andstoring the collections.
 30. In a computer, having a data storagedevice, a display device, and a processor for executing a program, amethod for preprocessing stored cardiac data originating from animplantable device, the method comprising: retrieving the stored datafrom the data storage device, wherein the data includes EGM waveformsegment data for a plurality of beats for a first heart chamber;clustering the EGM waveform segments into morphological similaritygroups having similar morphology with other members of the same group;and organizing morphologically similar and substantially chronologicallycontiguous cardiac cycle segments into collections of similar andsubstantially chronologically contiguous cycles.
 31. A method as inclaim 30, further comprising marking the collections with indicia ofcollection membership and storing the marked collections in the datastorage device.
 32. A method as in claim 31, further comprisingdisplaying the collections with visual indication of collectionmembership on the computer display device.
 33. A method as in claim 32,further comprising classifying the collections into preexistingclassifications of waveform morphologies and visually displaying thecollection classifications on the computer display device.
 34. A methodas in claim 30, wherein the retrieved EGM waveform data is stored as avector of wave amplitudes for each cardiac cycle segment; and whereinthe clustering includes clustering the EGM waveform vectors usingnearest neighbor vector clustering.
 35. A method as in claim 32, whereinthe clustering utilizes Euclidian distance between the EGM waveformvectors to cluster the EGM waveforms.
 36. A method for analyzing cardiacfirst sensor waveform data for a plurality of cardiac cycle, the methodcomprising grouping the cycles into a first level of first sensorwaveform groups, with members of the same first level first sensorwaveform group having similar first sensor waveform shapes to the otherfirst level first sensor waveform group members.
 37. A method as inclaim 36, further comprising: grouping the beats into a second level offirst sensor waveform groups, with members of the same second levelfirst sensor waveform group having similar first sensor waveform shapesto the group members and being substantially chronologically contiguousto the other second level first sensor waveform group members.
 38. Amethod as in claim 37, wherein the cycles have an associated secondsensor waveform, further comprising: grouping the cycles into a firstlevel of second sensor waveform groups, with members of the same firstlevel second sensor waveform group having similar second sensor waveformshapes to the other first level second sensor waveform group members;grouping the cycles into a second level of second sensor waveformgroups, with members of the same second level second sensor waveformgroup having similar waveforms to the other second level second sensorwaveform group members and being substantially chronologicallycontiguous to the other second level second sensor group members; andgrouping the cycles into a third level of beat groups, wherein themembers of the third level beat group are substantially all members ofboth the same second level first sensor waveform group and the samesecond level second sensor waveform group.
 39. A method as in claim 37,wherein the cycles have an associated second sensor waveform, furthercomprising: grouping the cycles into a second level of second sensorwaveform groups, with members of the same second level second sensorwaveform group having similar intervals to the other second level secondsensor group members and being substantially chronologically contiguousto the other second level second sensor group members; and grouping thecycles into a third level of beat groups, wherein members of the thirdlevel beat group are substantially all members of both the same secondlevel first sensor waveform group and the same second level secondsensor waveform group, and wherein the members of the third level cyclegroup are substantially chronologically coextensive with each other. 40.A method as in claim 36, further comprising selecting at a first sensorwaveform from a first sensor first level waveform group as an exemplarwaveform from that group and performing one of a step of storing,printing, displaying, and transmitting the exemplar waveform, as anexample of the waveforms of that first level first sensor group.
 41. Amethod as in claim 37, further comprising selecting a second level,first sensor group, selecting at a first sensor waveform from theselected second level first sensor waveform group as an exemplarwaveform from second level first sensor group, determining the time orbeat repeat length of that second level first sensor waveform group, andperforming one of a step of storing, printing, displaying, andtransmitting the exemplar waveform and repeat length, such that a secondlevel first sensor waveform group is compressed by selecting a waveformand number of repeats to represent the second level first waveformgroup.
 42. A computer program in a computer readable media for ultimateexecution in a data processing system for analyzing cardiac first sensorwaveform data for a plurality of cardiac cycles, the program comprisinginstructions for: grouping the cycles into a first level of first sensorwaveform groups, with members of the same first level first sensorwaveform group having similar first sensor waveform shapes to the otherfirst level first sensor waveform group members.
 43. A computer programin a computer readable media as in claim 42, the program furthercomprising instructions for: grouping the cycles into a second level offirst sensor waveform groups, with members of the same second levelfirst sensor waveform group having similar first sensor waveform shapesto the group members and being substantially chronologically contiguousto the other second level first sensor waveform group members.
 44. Acomputer program in a computer readable media as in claim 43, whereinthe cycles have an associated second sensor waveform, the programfurther comprising instructions for: grouping the cycles into a firstlevel of second sensor waveform groups, with members of the same firstlevel second sensor waveform group having similar second sensor waveformshapes to the other first level second sensor waveform group members;grouping the cycles into a second level of second sensor waveformgroups, with members of the same second level second sensor waveformgroup having similar waveforms to the other second level second sensorwaveform group members and being substantially chronologicallycontiguous to the other second level second sensor group members; andgrouping the cycles into a third level of beat groups, wherein themembers of the third level cycle group are substantially all members ofboth the same second level first sensor waveform group and the samesecond level second sensor waveform group.
 45. A computer program in acomputer readable media as in claim 43, wherein the cycles have anassociated second sensor waveform, the program further comprisinginstructions for: grouping the cycles into a second level of secondsensor waveform groups, with members of the same second level secondsensor waveform group having similar intervals to the other second levelsecond sensor group members and being substantially chronologicallycontiguous to the other second level second sensor group members; andgrouping the cycles into a third level of cycle groups, wherein membersof the third level beat group are substantially all members of both thesame second level first sensor waveform group and the same second levelsecond sensor waveform group, and wherein the members of the third levelcycle group are substantially chronologically coextensive with eachother.
 46. A computer program in a computer readable media as in claim42, the program further comprising instructions for: selecting at afirst sensor waveform from a first sensor first level waveform group asan exemplar waveform from that group and performing one of a step ofstoring, printing, displaying, and transmitting the exemplar waveform,as an example of the waveforms of that first level first sensor group.47. A computer program in a computer readable media as in claim 43, theprogram further comprising instructions for: selecting a second level,first sensor group, selecting at a first sensor waveform from theselected second level first sensor waveform group as an exemplarwaveform from second level first sensor group, determining the time orcycle repeat length of that second level first sensor waveform group,and performing one of a step of storing, printing, displaying, andtransmitting the exemplar waveform and repeat length, such that a secondlevel first sensor waveform group is compressed by selecting a waveformand number of repeats to represent the second level first waveformgroup.
 48. A computer-implemented software system in data communicationswith an implantable medical device (IMD), the software system incombination with the medical device comprising: means for storingphysiological data in the IMD; means for retrieving said physiologicaldata; means for extracting cycle segments; means for grouping intoidentity groups said cycle segments; means for marking group membershipamong said identity groups; means for storing said group membership; andmeans for displaying said group membership.
 49. The combination of claim48 wherein said physiological data includes at least one cardiac cycle.50. The combination of claim 49 wherein said cardiac cycle includes EGMdata, ECG data, intervals between sensed and paced events, and atrialand ventricular cycles.